import Vue from 'vue'
import App from './App.vue'


import home from './views/home.vue'
import classify from './views/classify.vue'
import order from './views/order.vue'
import mine from './views/mine.vue'
import sports from './views/sports.vue'

//体育的界面
import ChinaSports from './views/Second/ChinaSports.vue'

//导入路由
import VueRouter from 'vue-router'
Vue.config.productionTip = false



// 在vue中，使用使用vue的插件，都需要调用Vue.use()
Vue.use(VueRouter)

//创建路由规则
const routes = [
  {
    path: "/home",
    component: home
  },
  {
    path: "/classify",
    component: classify
  },
  {
    path: "/order",
    component: order
  },
  {
    path: "/mine",
    component: mine
  },
  {
    path: "/sports",
    component: sports,
    children: [
      {
        path: "ChinaSports",
        component: ChinaSports,
      }
    ]
  }
]

const router = new VueRouter({
  mude: 'history',
  routes
})



new Vue({
  render: h => h(App),
  router
}).$mount('#app')
